<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let shu = [88,20,10,100,50]
        let a = +prompt('请输入一个数值')
        for (let i = 0; i<shu.length;i++){
            const b = shu[i];
        if(a==b){
            alert(2)
        }else{
            alert(-1)
        }
    }
    </script>
</body>
</html>